<template>
  <view>



    <view class="welcome-container">
      <view class="welcome-title">欢迎踏入校园的「超链接宇宙」</view>
      <view class="welcome-subtitle">清晨的铃声、课间的喧闹、午后的操场…</view>
      <view class="welcome-content">
        校园里藏着无数未说出口的絮语：
      </view>

      <view class="feature-list">
        <view class="feature-item">
          <text class="feature-icon">✅</text>
          <text>校园树洞 收纳匿名心事</text>
        </view>
        <view class="feature-item">
          <text class="feature-icon">✅</text>
          <text>表白捞人 勇敢奔赴心动</text>
        </view>
        <view class="feature-item">
          <text class="feature-icon">✅</text>
          <text>失物招领 续写偶然错过的温暖</text>
        </view>
        <view class="feature-item">
          <text class="feature-icon">✅</text>
          <text>万能搭子 组队解锁课余 N 种可能</text>
        </view>
        <view class="feature-item">
          <text class="feature-icon">✅</text>
          <text>校园公告 同步最新动态</text>
        </view>
        <view class="feature-item">
          <text class="feature-icon">✅</text>
          <text>校园贴吧 汇聚同频灵魂</text>
        </view>
      </view>

      <view class="welcome-footer">
        每一次点击，都是「连接」的开始 ——
        在这里，让校园故事不再散落，让青春共鸣随时发生 ✨
      </view>
    </view>


    <view class="enter-forum-btn" @click="enterForum">
      <text>校园圈子</text>
    </view>









    <!-- uni.redirectTo({
    url: '/pages/Component/forum/Program/index/index'
    }); -->












    <view class="ikz-bid" v-if="false">
      <ikz-loading :css-data="loading_css"></ikz-loading>
      <view class="ikz-top-bg">
        <image class="ikz-top-bg-img" :src="service_img"></image>
      </view>
      <view class="ikz-banner-box">
        <ikz-banner :show-data="banner_data" :css-data="banner_css"></ikz-banner>
        <!-- <view class="ikz-location" @click="getPosition">
				<image src="/static/index/location.png" class="ikz-location-img"></image>
				<view>
					{{default_agent.title}}
				</view>
			</view> -->
      </view>
      <view class="ikz-notice">
        <ikz-notice :show-data="screen_data" @openScreen="openScreen"></ikz-notice>
      </view>
      <view>
        <ikz-menu :show-data="menu_data" :css-data="menu_css"></ikz-menu>
      </view>
      <!-- ad lis  -> -->
      <view>
        <ikz-ad :show-data="ad_data" :css-data="ad_css"></ikz-ad>
      </view>
      <!-- pages/Component/supermarket/Program/store/edit -->
      <!-- ad list
	<-- 广告招商 -->
      <!-- v-if="authItme.run_apply_status < 1" -->
      <view class="ikz-ad" @click="goApply">
        <!-- 判断是不是骑手 -->
        <image class="ikz-ad-img" :src="apply_image"></image>
      </view>
      <!-- <view class="ikz-bid">
      <view class="search-box">
        <uni-search-bar
          placeholder="搜索内容"
          radius="100"
          @confirm="onSearch"
          cancelButton="none"
        >
          <template v-slot:searchIcon>
            <uni-icons type="search" size="18" color="#999"></uni-icons>
          </template>
        </uni-search-bar>
      </view>
      <view class="ikz-top-bg">
        <uni-icons type="search" size="18" color="#999"></uni-icons>
      </view>
    </view> -->
      <!-- ad -->
      <!-- Tab切换 start-->
      <!-- <view class="ikz-tab"> -->
      <!-- <view
        class="ikz-tab-item"
        :class="{ active: selectedTab === 3 }"
        @click="switchTab(3)"
        >校园贴吧</view
      >
      <view
        class="ikz-tab-item"
        :class="{ active: selectedTab === 2 }"
        @click="switchTab(2)"
        >商家超市</view
      > -->
      <!-- <view
        class="ikz-tab-item"
        :class="{ active: selectedTab === 1 }"
        @click="switchTab(1)"
        >抢单列表</view
      > -->
      <!-- <view class="ikz-tab-item" style="padding-right: 0"
        ><view style="width: 123rpx; height: 42rpx"></view
      ></view>
    </view> -->
      <view class="margin-sm" @click="gotoSou">
        <use-navbar title="搜索"></use-navbar>

        <!-- 搜索内容区 -->
        <view class="search-area margin-bottom-sm pos-r w-full dflex-b border-radius-big margin-top-sm">
          <view class="dflex-c flex1">
            <view class="icon-search pos-a">
              <text class="iconfont iconsousuo-01"></text>
            </view>
            <input disabled type="text" class="dflex-col-c padding-left w-full padding-tb-xs box-sizing-b" maxlength="20"
              style="border-top-right-radius: 0; border-bottom-right-radius: 0" focus placeholder="请输入关键字" />
          </view>

          <view class="bg-base padding-tb-16 padding-lr-lg">搜索</view>
        </view>
      </view>
      <!-- Tab切换 end-->
      <!-- 抢单列表 -->
      <!-- <view v-if="listType == 1" style="padding-bottom: 32rpx">
      <ikz-glist
        :show-type="type_list"
        :show-data="show_info"
        :more-status="load_more"
        :receiver="isReceiver"
      ></ikz-glist>
    </view> -->
      <!-- 商家超市 -->
      <view style="padding-bottom: 32rpx">
        <store-list ref="storeList"></store-list>
      </view>
      <!-- 贴吧列表 -->
      <!-- <view v-if="listType == 3">
      <mainList :show-data="postsList" @likePosts="likePosts"></mainList>
    </view> -->
      <!-- list -->
      <ikz-screen :show-data="screen_data" @closeScreen="closeScreen"></ikz-screen>
      <!-- 缺省 -->
      <view class="default-height" style="width: 100%; height: 92rpx"></view>
      <ikz-tabbar :show-data="tabbar_Data"></ikz-tabbar>
      <!-- 悬浮图标联系客服 -->
      <!-- <view class="changeMode" @click="changeMode()">
			<image src="/static/kefu.png" mode="aspectFit"></image>
		</view>  -->
      <!-- 隐私授权弹窗 -->
      <!-- <privacy-popup position="center"></privacy-popup> -->


    </view>
  </view>
</template>

<script>
// 将分包的组件复制到公共
import storeList from "@/pages/Component/Public/store/list.vue";
import mainList from "@/pages/Component/Public/main-list/mainList.vue";
import ikzBanner from "@/pages/Component/Public/Banner/public/banner/banner.vue";
import ikzLoading from "@/pages/Component/Public/Loading/loading.vue";
import ikzNotice from "@/pages/Component/Public/Notice/public/notice/notice.vue";
import ikzMenu from "@/pages/Component/Public/Menu/public/menu2/menu.vue";
import ikzAd from "@/pages/Component/Public/Ad/public/ad/ad.vue";
import ikzGlist from "@/pages/Component/Public/Glist/public/glist/glist.vue";
import ikzScreen from "@/pages/Component/Public/Screen/public/screen/screen.vue";
import ikzTabbar from "@/pages/Component/Public/tab-bar/tab-bar.vue";
var app = getApp();
import ikz from "@/pages/Common/tools.js";
import Vue from "vue";
export default {
  components: {
    ikzBanner,
    ikzLoading,
    ikzNotice,
    ikzMenu,
    ikzAd,
    ikzGlist,
    ikzScreen,
    ikzTabbar,
    storeList,
    mainList,
  },
  data() {
    return {
      authItme: {},
      listType: 3,
      selectedTab: 3,
      postsList: [], //帖子列表
      tabbar_Data: {
        type: 0,
        list: [],
      },
      show_info: {
        list: [],
      },
      type_list: {
        list: [],
      },
      screen_data: {},
      ad_data: {},
      ad_css: {},
      banner_data: {
        ban_page: 2,
      },
      banner_css: {
        margin_top: 0,
      },
      loading_css: {
        display: "flex",
      },
      service_img: app.globalData.service_img,
      menu_data: {
        list: [],
      },
      menu_css: {
        background_color: "#fff",
        bg_border_radius: 15,
        border_radius: "50%",
        color: "#888888",
        margin_top: 15,
        num: "4",
        width: 95,
      },
      default_agent: {},
      apply_image: "",
      page: 1,
      limit: 10,
      load_more: 2,
      apply_receive_image_show: 1,
      // 是否为抢单员
      isReceiver: 0,
    };
  },
  onLoad() {

    // var TheSchool = uni.getStorageSync("SchoolObj");
    // if (!TheSchool) {
    //   var path = "/pages/Component/Module/Campus/Program/school/index/index";
    //   ikz.nav(path, "n", "");
    // } else {
    //   uni.setStorageSync("default_agent", TheSchool); //新增，原有的获取默认学校有bug，重置了一下，并且重新赋值
    //   app.globalData.default_agent = TheSchool;
    //   //console.log(TheSchool.id);
    // }

    // this.tabbar_Data.list = app.globalData.tabBarInfo;
    // uni.hideTabBar();
    // const obj = wx.getEnterOptionsSync();
    // if (obj.scene == 1047 || obj.scene == 1048 || obj.scene == 1049) {
    //   var pathId = {
    //     id: obj.query.scene,
    //   };
    //   if (pathId.id) {
    //     uni.setStorageSync("default_agent", pathId);
    //   }
    // }
    // uni.setNavigationBarTitle({
    //   title: app.globalData.miniapp_title,
    // });
    // this.page = 1;
    // this.show_info = {
    //   list: [],
    // };
    // this.type_list = {
    //   list: [],
    // };
    // this.load_more = 2;
    // this.listInfo((res) => { });
    // this.homeInfo((res) => {
    //   this.loading_css.display = "none";
    // });
    // this.$forceUpdate();
    // // uni.showShareMenu({
    // //   withShareTicket: true,
    // //   menus: ['shareAppMessage', 'shareTimeline']
    // // })
    // this.$refs.storeList.getStoreList();
    // if (this.listType == 2) {

    // } else if (this.listType == 3) {
    //   this.getPostsList();
    // }
  },
  onShareTimeline() {
    return {
      title: "自定义转发标题",
      query: "/page/Home/index?id=123",
    };
  },
  onShareAppMessage() {
    // const promise = new Promise(resolve => {
    //   setTimeout(() => {
    //     resolve({
    //       title: '自定义转发标题',
    //       imageUrl:'https://xybaddon.maiwd.cn/shareButton.png',
    //     })
    //   }, 2000)
    // })
    return {
      title: app.globalData.share_info.share_title,
      path: "/pages/Home/index",
      imageUrl: app.globalData.share_info.share_img,
    };
  },
  onShow() {
    this.getAuth();
    this.listInfo((res) => { });
    if (app.globalData.default_agent.title == undefined) {
      this.default_agent = {
        title: "请选择学校",
      };
    } else {
      this.default_agent = app.globalData.default_agent;
    }
    if (uni.getStorageSync("local_user_session")) {
      this.getBaseinfo();
    }
    this.handleReceiver();
    if (this.listType == 2) {
      this.$refs.storeList.getStoreList();
    } else if (this.listType == 3) {
      this.getPostsList();
    }
  },
  onPullDownRefresh() {
    this.homeInfo((res) => {
      uni.stopPullDownRefresh();
    });
    this.page = 1;
    this.listInfo();
  },
  onReachBottom() {
    if (this.load_more == 2) {
      this.page++;
      this.load_more = 3;
      this.listInfo((res) => { });
    }
    if (this.listType == 2) {
      this.$refs.storeList.onBottom();
    }
  },
  methods: {
    enterForum() {
      uni.navigateTo({
        url: '/pages/Component/forum/Program/index/index'
      });
    },
    gotoSou() {
      uni.navigateTo({
        url: "/pages/Home/sou",
      });
    },
    getAuth() {
      //跳转申请抢单员
      var path = "/xyb/user/auth";
      var data = {};
      ikz.post(path, data, (res) => {
        console.log(res.data.data.run_apply_status);
        if (res.data.code) {
          this.authItme = res.data.data;
        }
      });
    },
    switchTab(tab) {
      this.listType = tab;
      this.selectedTab = tab;
      this.$nextTick(() => {
        if (tab == 2) {
          this.$refs.storeList.getStoreList();
        } else if (tab == 3) {
          this.getPostsList();
        }
      });
    },
    // 获取最新或推荐帖子
    getPostsList() {
      let path = "/xyb/posts/posts/index";
      let data = {
        token: uni.getStorageSync("local_user_session"),
        recommend: 1,
        page: 1,
        limit: 5,
      };
      ikz.requestPost(path, data, (res) => {
        if (res.statusCode == 200) {
          console.log("获取最新或推荐帖子", res.data);
          let postsList = [];
          postsList = res.data.data.data;
          postsList.forEach((el) => {
            if (el.images.length != 0) {
              el.imagesNum = el.images.length;
              if (el.images.length > 3) {
                el.images.slice(0, 3);
              }
            }
          });
          this.postsList =
            this.page == 1
              ? postsList
              : [
                ...new Set(
                  [...this.postsList, ...postsList].map((post) =>
                    JSON.stringify(post)
                  )
                ),
              ].map((post) => JSON.parse(post));
          this.hasMore =
            this.page < res.data.data.count / this.limit ? true : false;
        }
        this.loadEnd = true;
        uni.hideLoading();
        uni.stopPullDownRefresh();
      });
    },
    // 点赞或取消点赞帖子
    likePosts(id, status) {
      let path = "";
      if (status == 0) {
        path = "/xyb/posts/posts/give";
      } else {
        path = "/xyb/posts/posts/give_del";
      }
      let data = {
        token: uni.getStorageSync("local_user_session"),
        posts_id: id,
      };
      ikz.requestPost(path, data, (res) => {
        if (res.statusCode == 200) {
          // console.log(res.data.data);
          this.postsList.forEach((el) => {
            if (el.id == id) {
              if (el.give_status == 0) {
                el.give_status = 1;
                el.give++;
              } else {
                el.give_status = 0;
                el.give--;
              }
            }
          });
          let title = "";
          if (status == 0) {
            title = "点赞成功";
          } else {
            title = "取消点赞";
          }
          uni.showToast({
            title,
            icon: "none",
          });
        }
      });
    },
    //获取用户信息
    getBaseinfo() {
      var path = "/xyb/user/baseinfo";
      var data = {
        token: uni.getStorageSync("local_user_session"),
        app_plat: "MP-WEIXIN",
      };
      ikz.get(path, data, (res) => {
        if (res.data.code) {
          console.log("值是", res.data.data);
          var user_address = res.data.data.user_address_list;
          if (user_address.length) {
            getApp().globalData.user_address.address_all = ""; //地址数据

            getApp().globalData.user_address.address_all = user_address; //地址数据
            for (var i = 0; i < user_address.length; i++) {
              if (user_address[i].defaults) {
                getApp().globalData.user_address.address_default =
                  user_address[i]; //默认地址
                getApp().globalData.user_address.address_current =
                  user_address[i]; //当前
              }
            }
            if (getApp().globalData.user_address.address_default == "") {
              getApp().globalData.user_address.address_default =
                user_address[0]; //默认地址
              getApp().globalData.user_address.address_current =
                user_address[0]; //当前
            }
          } else {
            getApp().globalData.user_address.address_all = ""; //地址数据
            getApp().globalData.user_address.address_default = ""; //默认地址
            getApp().globalData.user_address.address_current = ""; //当前
          }

          //设置用户信息
          if (res.data.data.user_info.nickname) {
            getApp().globalData.user_openinfo = res.data.data.user_info || {};
          } else {
            getApp().globalData.user_openinfo = {};
          }
        }
      });
    },
    //跳转申请抢单员
    goApply() {
      if (!uni.getStorageSync("user_info")) {
        uni.navigateTo({
          url: "/pages/login/index",
        });
        return;
      }
      var path = "/xyb/user/auth";
      var data = {};
      ikz.post(path, data, (res) => {
        if (res.data.code == 1) {
          //-1已驳回，0未审核，1已通过，2未申请
          if (res.data.data.run_apply_status == 1) {
            uni.navigateTo({
              url: "/pages/Component/Module/Receiver/Program/home/index/index",
            });
          } else if (res.data.data.run_apply_status == 0) {
            uni.showModal({
              title: "提示",
              content: "已申请，无需重复申请",
            });
          } else if (res.data.data.run_apply_status == -1) {
            uni.navigateTo({
              url: "/pages/Component/Module/Receiver/Program/apply/applyfail/index",
            });
          } else {
            uni.navigateTo({
              url: "/pages/Component/Module/Receiver/Program/apply/index/index",
            });
          }
          this.$forceUpdate();
        } else {
          uni.showModal({
            title: "提示",
            content: res.data.msg,
            showCancel: false,
            success: function (res) { },
          });
        }
      });
    },
    //关闭公告
    closeScreen() {
      this.screen_data.show = false;
    },
    //打开公告
    openScreen() {
      this.screen_data.show = true;
    },
    // 抢单列表
    listInfo() {
      var path = "/xyb/mp_weixin_home/server_list";
      var url = app.globalData.adminPath + path;
      var data = {
        page: this.page,
        limit: this.limit,
        token: uni.getStorageSync("local_user_session"),
        agent_id: uni.getStorageSync("default_agent").id || "",
      };
      if (uni.getStorageSync("local_user_session")) {
        uni.request({
          url: url,
          header: {
            "Content-Type": "application/x-www-form-urlencoded",
          },
          data: data,
          method: "POST",
          success: (res) => {
            if (res.data.code == 1) {
              var temp_list = res.data.data.data;
              if (this.page != 1) {
                for (var i = 0; i < temp_list.length; i++) {
                  this.show_info.list.push(temp_list[i]);
                }
              } else {
                this.show_info.list = temp_list;
              }
              if (temp_list.length == this.limit) {
                this.load_more = 2;
              } else {
                if (this.page == 1) {
                  if (temp_list.length == 0) {
                    this.load_more = 5;
                  } else {
                    this.load_more = 4;
                  }
                } else {
                  this.load_more = 4;
                }
              }
              this.$forceUpdate();
            } else if (res.data.code == 0) {
              uni.showModal({
                title: "提示",
                content: res.data.msg,
                showCancel: false,
                success: function (res) { },
              });
            } else {
              console.log(res.data.msg);
            }
          },
          fail: function (res) {
            //调用接口失败或回传失败
            uni.showModal({
              title: "服务器繁忙",
              content: "服务器繁忙或网络不稳定，请稍后再试！",
            });
          },
        });
      }
    },
    // 判断是否是抢单员
    handleReceiver() {
      var path = "/xyb/user/is_receiver";
      var url = app.globalData.adminPath + path;
      var data = {
        app_plat: "MP-WEIXIN",
        token: uni.getStorageSync("local_user_session"),
        agent_id: uni.getStorageSync("default_agent").id || "",
      };
      if (data.token) {
        uni.request({
          url: url,
          header: {
            "Content-Type": "application/x-www-form-urlencoded",
          },
          data: data,
          method: "POST",
          success: (res) => {
            console.log("是否为抢单员", res.data.data.is_receiver);
            uni.setStorageSync("receivers", res.data.data.is_receiver);
            this.isReceiver = res.data.data.is_receiver;
          },
          fail: function (res) {
            //调用接口失败或回传失败
            uni.showModal({
              title: "服务器繁忙",
              content: "服务器繁忙或网络不稳定，请稍后再试！",
            });
          },
        });
      }
    },
    //获取首页信息
    homeInfo(fn) {
      var path = "/xyb/mp_weixin_home/index";
      var url = app.globalData.adminPath + path;
      var _that = this;
      uni.request({
        url: url,
        header: {
          "Content-Type": "application/x-www-form-urlencoded",
        },
        data: {
          agent_id: uni.getStorageSync("default_agent").id || "",
        },
        method: "POST",
        success: function (res) {
          if (res.data.code == 1) {
            _that.apply_receive_image_show =
              res.data.data.apply_receive_image_show;
            _that.ad_data = res.data.data.advertise_list;
            _that.banner_data = res.data.data.carousel_list;
            _that.apply_image = res.data.data.apply_receive_image;
            var menu_temp = res.data.data.server_list;
            _that.menu_data.list = [];
            for (var i = 0; i < menu_temp.length; i++) {
              _that.menu_data.list.push({
                src: menu_temp[i].icon_image,
                title: menu_temp[i].server_name,
                url: menu_temp[i].url,
              });
            }
            _that.screen_data = {
              title: res.data.data.notice_title,
              content: res.data.data.notice_content,
              show: false,
            };
            _that.$forceUpdate();
          } else {
            uni.showModal({
              title: "提示",
              content: res.data.msg,
              showCancel: false,
              success: function (res) { },
            });
          }
          fn();
        },
        fail: function (res) {
          //调用接口失败或回传失败
          uni.showModal({
            title: "服务器繁忙",
            content: "服务器繁忙或网络不稳定，请稍后再试！",
          });
        },
      });
    },
    //切换位置
    // getPosition() {
    // 	var path = '/pages/Component/Module/Campus/Program/school/index/index';
    // 	ikz.nav(path, 'n', '');
    // },
    //不同意
    cancelTreaty() {
      //退出程序
      // plus.runtime.quit();
    },
    //查看平台协议
    getTreaty(e) {
      var id = e.currentTarget.dataset.id;
      var path = "/pages/Component/Module/Login/treaty/index?id=" + id;
      ikz.nav(path, "n", "");
    },

    //请求页面数据
    getList() {
      var path = "/Supply/Wechat/Public/indexPage";
      var data = {
        longitude: this.longitude,
        latitude: this.latitude,
      };
      ikz.get(path, data, (res) => {
        if (res.data.status == "success") {
        } else {
          uni.showModal({
            title: "提示",
            content: "服务器繁忙，请稍后再试",
            showCancel: false,
            success: function (res) { },
          });
        }
        // if(that.pull_status){
        // 	this.$emit("change",'pull');
        // }
      });
    },

    //跳转至招聘中心
    getRecriut() {
      let url = "/pages/Component/Module/Demand/Program/Recruit/index";
      ikz.nav(url, "n");
    },
  },
};
</script>

<style scoped lang="scss">
.enter-forum-btn {
  margin: 30rpx auto;
  width: 80%;
  height: 80rpx;
  background: linear-gradient(45deg, #ff5f15, #ff8c5f);
  color: white;
  border-radius: 40rpx;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32rpx;
  font-weight: bold;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4rpx 20rpx rgba(255, 95, 21, 0.5);
  transition: all 0.3s ease;

  /* 玻璃发光效果 - 动画版 */
  &::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0) 60%);
    transform: rotate(30deg);
    pointer-events: none;
    animation: glassShine 3s infinite;
  }

  /* 按压效果 */
  &:active {
    transform: scale(0.98);

    &::before {
      opacity: 0.8;
    }
  }

  /* 文字效果 */
  text {
    position: relative;
    z-index: 1;
    text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2);
  }
}

/* 玻璃发光动画 */
@keyframes glassShine {
  0% {
    transform: rotate(30deg) translate(-30%, -30%);
  }

  50% {
    transform: rotate(30deg) translate(30%, 30%);
  }

  100% {
    transform: rotate(30deg) translate(-30%, -30%);
  }
}

.welcome-container {
  padding: 40rpx;
  background: linear-gradient(to bottom, #ff5f1559, #ff5f15);
  border-radius: 24rpx;
  margin: 30rpx;
  box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.05);
}

.welcome-title {
  font-size: 40rpx;
  font-weight: bold;
  color: #333;
  text-align: center;
  margin-bottom: 20rpx;
}

.welcome-subtitle {
  font-size: 30rpx;
  color: #333;
  text-align: center;
  margin-bottom: 30rpx;
}

.welcome-content {
  font-size: 32rpx;
  color: #444;
  margin-bottom: 30rpx;
  line-height: 1.6;
}

.feature-list {
  margin-bottom: 40rpx;
}

.feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 20rpx;
  font-size: 30rpx;
  color: #3a3535;
  line-height: 1.5;
}

.feature-icon {
  margin-right: 15rpx;
  color: #4CAF50;
}

.welcome-footer {
  font-size: 28rpx;
  color: #333;
  text-align: center;
  line-height: 1.6;
  margin-top: 30rpx;
  font-style: italic;
}
</style>
<!-- <style scoped lang="scss">
.search-box {
  padding: 20rpx;
  background-color: #fff;
  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 999;
}

.search-area {
  input {
    padding-left: 80rpx;
    height: 76rpx;
    background-color: #fff;
    display: flex;
    flex-direction: column;
  }

  .icon-search {
    top: 50%;
    left: 30rpx;
    transform: translate(0, -50%);
    z-index: 1;

    text {
      color: #c0c0c0;
    }
  }
}

.ikz-top-bg {
  position: fixed;
  top: 0px;
  left: 0px;
}

.ikz-tab {
  padding: 20rpx 20rpx;
  display: flex;
  align-items: center;
  font-size: 32rpx;
  justify-content: space-between;
  position: relative;
  top: 5rpx;

  .ikz-tab-item {
    padding-right: 16rpx;
    color: #333;

    &.active {
      color: #c18b17;
      font-weight: 600;
    }
  }
}

.ikz-top-bg {
  position: fixed;
  top: 0px;
  left: 0px;
}

.ikz-top-bg-img {
  width: 100%;
  height: 200rpx;
}

.ikz-banner-box {
  position: relative;
  width: 95%;
  margin: 15rpx auto 0px;
}

.ikz-location {
  box-sizing: border-box;
  position: absolute;
  top: 30rpx;
  left: 50rpx;
  display: flex;
  align-items: center;
  padding: 10rpx 40rpx 10rpx 30rpx;
  background: rgba(000, 000, 000, 0.3);
  color: #fff;
  border-radius: 70rpx;
  font-size: 25rpx;
}

.ikz-location-img {
  width: 40rpx;
  height: 40rpx;
  margin-right: 10rpx;
}

/* ad */
.ikz-ad {
  width: 95%;
  margin: 16rpx auto;
}

.ikz-ad-img {
  width: 100%;
  height: 150rpx;
}

.changeMode {
  position: fixed;
  right: 2.5%;
  bottom: 500rpx;
  padding-bottom: constant(safe-area-inset-bottom);
  /* 兼容 iOS < 11.2 */
  padding-bottom: env(safe-area-inset-bottom);
  /* 兼容 iOS >= 11.2 */
  z-index: 9999;
}

.changeMode image {
  width: 120rpx;
  height: 120rpx;
}

/* ad */
</style> -->